#if (1 == SDK_WORK_PLATFORM) && (!(defined(GREATBELT) || defined(GOLDENGATE)))
#ifndef _DAL_USER_SIM_MCHIP_H
#define _DAL_USER_SIM_MCHIP_H
#ifdef __cplusplus
extern "C" {
#endif



#include "sal.h"

enum dal_shm_io_type_e
{
    DAL_SHM_IO_NORMAL,
    DAL_SHM_IO_TCAM,
    DAL_SHM_IO_PCI,
    DAL_SHM_IO_PCI_EXT,
    DAL_SHM_IO_OAM,
    DAL_SHM_IO_MAX
};
typedef struct dal_shm_cmd_s
{
    uint32 working  : 1;  /*must at first*/
    uint32 io_type  : 4;  /*0:normal, 1:tcam, 2: pci; 3:pci_ext*/
    uint32 done     : 1;
    uint32 tbl_type : 4; /*drv_tbl_type_t*/
    uint32 lchip    : 8;
    uint32 oper_bmp : 8;
    uint32 valid    : 1;
    uint32 op       : 3; /*DRV_IOC_WRITE/ DRV_IOC_WRITE*/
    uint32 rsv      : 2;

    uint32 cmd;
    uint32 index;
    int32 status; /*error code*/
    uint32 tbl_id;
    uint16 len;
    uint16 rsv1;


    char data[0]; /*must at the last*/
}dal_shm_cmd_t;

typedef struct cmodel_shm_cli_cmd_s
{
    uint32 valid    : 1;
    uint32 done     : 1;
    uint32 rsv      : 30;
    int32  status;
    char   func[256];
    int32  argc;
    char   args[0]; /*must at the last*/
}cmodel_shm_cli_cmd_t;

/*
|DAL_SHM_DMA_SIZE|DAL_SHM_CLI_SIZE|DAL_SHM_PCI_SIZE|
*/

#define DAL_SHM_DMA_SIZE (1024 * 1024 * 40)
#define DAL_SHM_PCI_SIZE (2560)
#define DAL_SHM_CLI_SIZE (4096)
extern uint8
dal_sdk_work_with_shm();

extern uint8*
dal_shm_get_cmodel_cli_cmd_ptr(uint8 lchip);

#define DAL_SDK_WORK_WITH_SHM dal_sdk_work_with_shm()

#ifdef __cplusplus
}
#endif
#endif
#endif
